Skip to content

Remove auth0-extension-tools dep#417

Merged
sauntimo merged 29 commits intomasterfrom
remove-a0-ext-tools
Apr 14, 2026
Merged

Remove auth0-extension-tools dep#417
sauntimo merged 29 commits intomasterfrom
remove-a0-ext-tools

Conversation

@sauntimo
Copy link
Copy Markdown
Contributor

@sauntimo sauntimo commented Jan 9, 2026

✏️ Changes

  • Removes dependency on auth0-extension-tools library and ports in code and tests, and does some small refactors + fixes.
  • Updates axios to 1.15.0.
  • This will be released as a patch update meaning that users do not need to update to get it, anyone already on this minor version will get this new version automatically.

📷 Screenshots

If there were visual changes to the application with this change, please include before and after screenshots here. If it has animation, please use screen capture software like to make a gif.

🔗 References

🎯 Testing

  • This has been tested in layer0 and in a prod tenant manually using this doc which describes our smoke testing flows. We've also run the integration tests against a production tenant.

✅ This change has been tested in a Webtask
✅ This change has unit test coverage
✅ This change has integration test coverage
✅ This change has been tested for performance

🚀 Deployment

✅ This can be deployed any time

🎡 Rollout

In order to verify that the deployment was successful we will conduct smoke testing in a prod tenant.

🔥 Rollback

We will rollback if we detect issues with the new release

📄 Procedure

In order to recover quickly, we will revert these changes and release them as the next patch version, 2.13.4

@sauntimo sauntimo force-pushed the remove-a0-ext-tools branch from d9783fc to bbd48a7 Compare January 9, 2026 17:07
@sauntimo sauntimo changed the title [Experiment] Remove auth0-extension-tools dep Remove auth0-extension-tools dep Apr 14, 2026
@sauntimo sauntimo self-assigned this Apr 14, 2026
@sauntimo sauntimo added the dependencies Pull requests that update a dependency file label Apr 14, 2026
@MatteoK MatteoK self-requested a review April 14, 2026 16:39
Copy link
Copy Markdown

@MatteoK MatteoK left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost all of the many changes are copying over code 1to1 from auth0-extension-tools to remove the dependency. Refactorings have been made to

- users.js
- server.js
- apiCall.js

The refactorings maintain the existing behavior and look logically sound.
We have tested the branch via manual testing and integration testing.

Once the /develop paths are reverted again this is good to go imo

"exponent": "AQAB",
"fingerprint": "16:E1:57:AE:1E:78:20:97:C8:89:92:96:57:91:B6:4B:19:89:5A:97"
},
"bar": {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new certs are required for the session manager tests

@@ -0,0 +1,64 @@
// Mock fetch to work with nock
Copy link
Copy Markdown
Contributor Author

@sauntimo sauntimo Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This branch upgraded the auth0 SDK to v4, which switched its HTTP transport from superagent/axios to the native fetch API (backed by undici in Node.js 22).

The problem is that nock works by monkey-patching Node's http and https modules. The old SDK used axios/superagent which route through those modules, so nock's interceptors caught everything. Native fetch uses undici internally and bypasses http/https entirely, making all nock mocks invisible to it.

fetch-mock.js fixes this by replacing global.fetch with a custom implementation that re-routes requests back through http/https — exactly the modules nock patches. The Auth0 SDK calls fetch, gets this shim instead, which uses http.request/https.request, which nock intercepts as normal.

@sauntimo sauntimo marked this pull request as ready for review April 14, 2026 18:15
@sauntimo sauntimo merged commit e08070f into master Apr 14, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants